/**
 * Copyright(C) 2008 Matthias Braunhofer
 * All rights reserved
 *
 * Created on: 28.07.2008
*/

package it.cums.ui.wizards;

import it.cums.ui.localization.Messages;

import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

public class SupplierAccountWizardPage extends WizardPage implements IWizardPage {
	private Text accountDetailsText;
	private Composite container;
	
	public SupplierAccountWizardPage() {
		super(Messages.SupplierAccountWizardPage_0);
		setTitle(Messages.SupplierAccountWizardPage_1);
		setDescription(Messages.SupplierAccountWizardPage_2);
	}

	
	public void createControl(Composite parent) {
		container = new Composite(parent, SWT.NULL);
		GridLayout layout = new GridLayout();
		container.setLayout(layout);
		layout.numColumns = 2;
		Label label1 = new Label(container, SWT.NULL);
		label1.setText(Messages.SupplierAccountWizardPage_3);
		
		accountDetailsText = new Text(container, SWT.BORDER | SWT.MULTI);
		GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
		gd.verticalSpan = 2;
		accountDetailsText.setLayoutData(gd);
	
		setControl(container);
		setPageComplete(true);
	}
	
	public String getAccountDetails() {
		return accountDetailsText.getText().trim();
	}
	
	
	public Control getControl() {
		return container;
	}
}
